<?php
class foo {
	function foo() {
		$this->bar=18;
	}
} 

$foo=new foo();


echo "<script type='text/javascript'>alert(2+$foo->bar);</script>"
?>